package com.jnevision.notice.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.jnevision.util.DateUtil;

/**
 * <p>
 * 通知
 * </p>
 *
 * @author gavin
 * @since 2019-07-14
 */
@TableName("b_notice")
public class Notice extends Model<Notice> {
    private static final long serialVersionUID = -6123188791380303670L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("theme")
    private String theme;

    @TableField("content")
    private String content;

    @TableField("weight")
    private Integer weight;

    @TableField("create_time")
    private String createTime = DateUtil.getNormalTime();

    @TableField("is_valid")
    @TableLogic
    private Boolean valid;

    @TableField("dept_id")
    private Integer deptId;
    @TableField("user_id")
    private String userId;

    @TableField(exist = false)
    private String start;
    @TableField(exist = false)
    private String end;
    @TableField("browsing")
    private Integer browsing;
    @TableField(exist = false)
    private String outUrl;

    public String getStart() {
        return this.start;
    }

    public void setStart(String start) {
        this.start = start;
    }

    public String getEnd() {
        return this.end;
    }

    public void setEnd(String end) {
        this.end = end;
    }

    public String getUserId() {
        return this.userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Integer getDeptId() {
        return this.deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Boolean isValid() {
        return valid;
    }

    public void setValid(Boolean valid) {
        this.valid = valid;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Notice{" + "id=" + id + ", theme=" + theme + ", content=" + content + ", weight=" + weight
            + ", createTime=" + createTime + ", valid=" + valid + "}";
    }

    public Integer getBrowsing() {
        return this.browsing;
    }

    public void setBrowsing(Integer browsing) {
        this.browsing = browsing;
    }

    public String getOutUrl() {
        return this.outUrl;
    }

    public void setOutUrl(String outUrl) {
        this.outUrl = outUrl;
    }
}